import { createApp } from "vue";
import App from "./App.vue";
import registerDirectives from "./directives";
import plugin_obj from "./plugins/plugin_obj";
import plugin_fun from "./plugins/plugin_fun";

const app = createApp(App);
//  全局注册
app.directive("autofocus", {
  mounted(el) {
    el.focus();
  },
});
// 进行手动传入app
registerDirectives(app);

// 插件的形式
app.use(plugin_obj);
app.use(plugin_fun);

app.mount("#app");
